# Contributor: Matthias Ahouansou <matthias@ahouansou.cz>
# Maintainer: Matthias Ahouansou <matthias@ahouansou.cz>
pkgname=mailtutan
pkgver=0.3.0
pkgrel=0
pkgdesc="An SMTP server for test and development environments written in Rust"
url="https://github.com/mailtutan/mailtutan"
arch="all !s390x !riscv64 !ppc64le" # builds fail due to ring (dependency), see issues 986, 1612 and 1630 respectively at https://github.com/briansmith/ring
license="MIT"
makedepends="
	cargo
	cargo-auditable
"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/mailtutan/mailtutan/archive/refs/tags/v$pkgver.tar.gz
"
options="!check" # no tests

prepare() {
	default_prepare
	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --release --frozen
}

package() {
	install -Dm 755 target/release/mailtutan "$pkgdir"/usr/bin/mailtutan
}

sha512sums="
5193a5a946a50e865de0b60930c4ba2d227e3c418d4f6d90a9eba7a184c7c09441be459e09160bf76ee943703d41a8db7986901b2a098f56a9db030c4fc342c1  mailtutan-0.3.0.tar.gz
"
